package com.fang.common.dto.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Fang Ruichuan
 * @date 2022-09-07 20:55
 */
@Data
@Builder
@ApiModel(value = "添加菜单入参")
public class SysMenuAddParam implements Serializable {

    @NotNull(message = "父级菜单不能为空")
    @ApiModelProperty(value = "父级菜单", required = true)
    private Long parentId;

    @ApiModelProperty(value = "菜单URL")
    private String path;

    @NotBlank(message = "权限不能为空")
    @ApiModelProperty(value = "授权", required = true)
    private String perms;

    @ApiModelProperty(value = "组件")
    private String component;

    @NotNull(message = "类型不能为空")
    @ApiModelProperty(value = "类型, 0-目录，1-菜单，2-按钮", required = true)
    private Integer type;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    @NotNull(message = "排序不能为空")
    @ApiModelProperty(value = "排序", required = true)
    private Integer orderNum;
}
